public class Messages extends SodiumUI {
	
	public static String lastMessage;
	
	/**
	 * @return Returns the <tt>last</tt> message sent/received in the chat.
	 */
	public static final String getLastMessage() {
		return messages[messages.length - 1];
	}
	
	/**
	 * @param index The index of which you'd like to retrieve a String from.
	 * @return Returns the <tt>String</tt> found at the index 'index'.
	 */
	public static final String getMessageAt(final int index) {
		return messages[index];
	}
	
	/**
	 * @param message The String to retrieve the numbers from.
	 * @return Returns the <tt>tokenization</tt> of numbers from the String 'message'.
	 */
	public static final int getNumber(final String message) {
		String number = "";
		final char[] numbers = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
		for (final char mess : message.toCharArray()) {
			for (final char num : numbers) {
				if (mess == num) {
					number = number.concat(Character.toString(mess));
				}
			}
		}
		return Integer.parseInt(number);
	}
}